import Vue from 'vue'
import Router from 'vue-router'

import Home from "@/containers/Home"
import Fitness from "@/containers/Fitness"
import Find from "@/containers/Find/Find"
import Mine from "@/containers/Mine/Mine"
import Personal from "@/containers/Mine/Personal"
import Register from "@/containers/Register/Register"

//
import FitDetail from "@/containers/Find/FindSubpage/Dynamic/DynamicSubpage/FitDetail"


Vue.use(Router)

export default new Router({
  linkActiveClass:"actives",
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    }, 
    {
        path: '/fitness',
        name: 'fitness',
        component: Fitness
      }, 
      {
        path: '/find',
        name: 'find',
        component: Find
      }, 
      {
        path: '/mine',
        name: 'mine',
        component: Mine,
        meta: { 
          //需要登录
          isLogin: true 
        }
      }, 
      {
        path:"/personal",
        name:"personal",
        component:Personal,
      },
      {
        path:"/detail/:type",
        name:"Detail",
        component:()=>import ("@/containers/Mine/subPage/subPageNext/Detail")
      },
      {
        path:"/register",
        name:"register",
        component:Register,
      },
      {
        path:"/login",
        name:"Register",
        component:()=>import("@/containers/Login/index")
      },
      {
        path:"/setting",
        name:"Setting",
        component:() =>import("@/containers/Mine/subPage/subPage")
      },
      {
        path:"/account",
        name:"Account",
        component:() =>import ("@/containers/Mine/subPage/subPageNext/Account"),
      },
      //
      {
        path: '/fitdetail:fit_id',
        name: 'fitdetail',
        component: FitDetail,
        props: true,
        // meta: {
        //   keepAlive: false 
        // }
      },
     
      
  ]
})
